package com.ruoyi.common.constant;

import org.springframework.data.redis.core.PartialUpdate;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 通用常量信息
 * 
 * @author ruoyi
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    public static final String CAPTCHA_CODE_KEY_WEB = "captcha_codes_web:";
    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    public static final String LOGIN_TOKEN_KEY_WEB = "login_tokens_web:";
    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 5;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    public static final String TOKEN_WEB = "token_web";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";
    public static final String LOGIN_USER_KEY_WEB = "login_user_key_web";
    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = "sub";

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 停用
     */
    public static final String STOP = "1";

    /**
     * 启用
     */
    public static final String ENABLE = "0";

    /**
     * 删除
     */
    public static final String DELETE = "2";

    /**
     * 失败状态码
     */
    public static final int FAILCODE = -1;

    /**
     * 饰品所属类型 0 箱子 1 ROLL房 2 幸运饰品 3 饰品商城 4 补偿饰品
     * 5 盲盒对战 6 盲盒对战保底饰品 7 赠送饰品
     * 8 充值积分箱子 9 推广积分箱子 10 全名挑战 11 任务模块领取 12 刮刮乐箱子 13 免费箱子 14 战令箱子 15 补偿奖励
     */
    public static final String GOOGSBLTYPE0 = "0";
    public static final String GOOGSBLTYPE1 = "1";
    public static final String GOOGSBLTYPE2 = "2";
    public static final String GOOGSBLTYPE3 = "3";
    public static final String GOOGSBLTYPE4 = "4";
    public static final String GOOGSBLTYPE5 = "5";
    public static final String GOOGSBLTYPE6 = "6";
    public static final String GOOGSBLTYPE7 = "7";
    public static final String GOOGSBLTYPE8 = "8";
    public static final String GOOGSBLTYPE9 = "9";
    public static final String GOOGSBLTYPE10 = "10";
    public static final String GOOGSBLTYPE11 = "11";
    public static final String GOOGSBLTYPE12 = "12";
    public static final String GOOGSBLTYPE13 = "13";
    public static final String GOOGSBLTYPE14 = "14";
    public static final String GOOGSBLTYPE15 = "15";

    /**
     * 手机短信验证码前缀
     */
    public static final String PHONE_CODE = "phone_code:";

    /**
     * 短信Code
     */
    public static final String CODE_0 = "Ok";
    public static final String CODE_1 = "isv.MOBILE_NUMBER_ILLEGAL";//无效号码
    public static final String CODE_2 = "isv.SYSTEM_ERROR";//系统错误
    public static final String CODE_4 = "isv.AMOUNT_NOT_ENOUGH";//账号余额不足

    /**
     * 后台标志
     */
    public static final String BACKSTAGE="back";

    /**
     * 背包状态 0 待处理  1 取回中 2 已取回 3 已兑换 4 取货失败 5 待发货 6待收货 7 饰品抵扣
     */
    public static final String BBSTATUS0="0";
    public static final String BBSTATUS1="1";
    public static final String BBSTATUS2="2";
    public static final String BBSTATUS3="3";
    public static final String BBSTATUS4="4";
    public static final String BBSTATUS5="5";
    public static final String BBSTATUS6="6";
    public static final String BBSTATUS7="7";


    /**
     * 用户加入ROLL房状态  0 未加入 1 已加入 2 已结束
     */
    public static final String USERROLLSTATUS0 = "0";
    public static final String USERROLLSTATUS1 = "1";
    public static final String USERROLLSTATUS2 = "2";

    /**
     * ROLL房状态 0  待上线 1 已上线 2 已结束
     */
    public static final String ROLLSTATUS0 = "0";
    public static final String ROLLSTATUS1 = "1";
    public static final String ROLLSTATUS2 = "2";

    /**
     * ROLL房门槛类型 ROLL房门槛类型
     * 0 无门槛
     * 1 关注门槛
     * 2 充值总额门槛
     * 3 时间段内充值门槛
     * 4 关注门槛+充值总额门槛
     * 5 关注门槛+时间段内充值门槛
     * 6 门槛密码
     * 7 时间段内注册
     * 8 注册门槛+关注门槛
     */
    public static final String ROLLMKTYPE0 = "0";
    public static final String ROLLMKTYPE1 = "1";
    public static final String ROLLMKTYPE2 = "2";
    public static final String ROLLMKTYPE3 = "3";
    public static final String ROLLMKTYPE4 = "4";
    public static final String ROLLMKTYPE5 = "5";
    public static final String ROLLMKTYPE6 = "6";
    public static final String ROLLMKTYPE7 = "7";
    public static final String ROLLMKTYPE8 = "8";

    /**
     * 排序 0  从低到高  1  从高到低
     */
    public static final String ASC = "0";
    public static final String DESC = "1";

    /**
     * 饰品库存状态 0 库存充足 1 库存不足
     */
    public static final String STOCKSTATUS0 = "0";
    public static final String STOCKSTATUS1 = "1";

    /**0 普通红包:都能领取
     * 1 拉新红包：没有填写过推广码的
     * 2 历史充值门槛红包：达到充值门槛才能领取
     * 3 时间段充值门槛：时间段内达到充值门槛才能领取
     * 4 指定手机号
     * */
    public static final String REDBAGTYPE0 = "0";
    public static final String REDBAGTYPE1 = "1";
    public static final String REDBAGTYPE2 = "2";
    public static final String REDBAGTYPE3 = "3";
    public static final String REDBAGTYPE4 = "4";

    /**
     * 充值状态  0  待确认中  1  成功  2 失败
     */
    public static final String CZSTATUS0 = "0";
    public static final String CZSTATUS1 = "1";
    public static final String CZSTATUS2 = "2";

    /**
     * 首充状态 0 是首充 1 不是首充
     */
    public static final String SCSTATUS0 = "0";
    public static final String SCSTATUS1 = "1";

    /**
     * 用户类型 0 普通用户 1 主播 2 测试机器人 3 对战机器人 4 AI对战机器人
     */
    public static final String USERTYPE0 = "0";
    public static final String USERTYPE1 = "1";
    public static final String USERTYPE2 = "2";
    public static final String USERTYPE3 = "3";
    public static final String USERTYPE4 = "4";

    public static final String KEY = "USERID:";

    public static final String DRDRKEY = "DRDRUSERID:";

    public static final String DRQHZJESXKEY = "DRQHZJESX";

    public static final String DRQHZSLSXKEY = "DRQHZSLSX";

    /**人工审核状态 0 待审核 1 已审核  2 自动审核  3 人工审核不通过 4 禁止取回 5 已兑换*/
    public static final  String AUDITSTATUS0 = "0";
    public static final  String AUDITSTATUS1 = "1";
    public static final  String AUDITSTATUS2 = "2";
    public static final  String AUDITSTATUS3 = "3";
    public static final  String AUDITSTATUS4 = "4";
    public static final  String AUDITSTATUS5 = "5";

    /**取货秘钥*/
    public static final String APP_KEY = "d29d5b84d85665c6dc574cb03c005ecc";
    public static final String APPID = "730";

    /**取货最高报价利率*/
    public static final BigDecimal maxPriceRate = new BigDecimal(1.3);

    /**充值回执函数*/
    public static final String NOTIFYURL = "https://www.kingsskins.com/css/payjsNotifySomisspay";
    //public static final String NOTIFYURL = "http://119.45.102.239/css/payjsNotifySomisspay";

    /**饰品取回失败后过时多少分钟再次取货*/
    public static final int retrieveAfterTime = 20;

    /**饰品开箱锁的前缀*/
    public static final String OPENKEY = "openLock:";
    /**箱子ID的KEY*/
    public static final String BOXIDKEY = "boxId:";

    /**后台登录手机号*/
    public static final String ADMINPHONE="19973731878";

    /**登录统计数key*/
    public static final String LOGINCOUNTKEY="logincountkey:";

    public static String[] USERPHONELIST = {"19973731878","15273167007","18338586496","18366007079","13772989239"};
    public static String USERLOCK = "userlock:";

    public static  final  int USERKEYDAY = 10;

    public static  final String ISBATTLE0 = "0";
    public static  final String ISBATTLE1 = "1";


    /**对战用户状态 对战状态 0 失败方 1 胜者方  2 平手 */
    public static final String BATTLEUSERSTATUS0 = "0";
    public static final String BATTLEUSERSTATUS1 = "1";
    public static final String BATTLEUSERSTATUS2 = "2";

    /** 对战状态 0 等待中  1 对战中 2 已结束*/
    public static final String BATTLEINFOSTATUS0 = "0";
    public static final String BATTLEINFOSTATUS1 = "1";
    public static final String BATTLEINFOSTATUS2 = "2";



    /**房间详情页面展示的状态
     * 0 房主本人查看未结束的房间，隐藏立即加入按钮
     * 1 非房主查看未结束的房间详情，此时显示那个立即加入按钮
     * 2 房间已结束并获胜，弹出中奖的饰品页面
     * 3 房间已结束输了 弹出失败的页面，保底饰品
     * 4 房间已结束，并不在对战中的用户查看已经结束的房间详情
     * 5 房间已结束，对战平手
     * */
    public static final String DISPLAYSTATUS0="0";
    public static final String DISPLAYSTATUS1="1";
    public static final String DISPLAYSTATUS2="2";
    public static final String DISPLAYSTATUS3="3";
    public static final String DISPLAYSTATUS4="4";
    public static final String DISPLAYSTATUS5="5";

    public static final String CARDPHONE = "19973731878";

    public static final String CARDPHONE_CODE = "cardphone_code:";


    /**充值卡状态 0 待出售 1 待使用 2 已使用 3 停用*/
    public static final String CARDSTATUS0 = "0";
    public static final String CARDSTATUS1 = "1";
    public static final String CARDSTATUS2 = "2";
    public static final String CARDSTATUS3 = "3";


    /**
     * 操作类型：
     * 0-充值
     * 1-开箱
     * 2-幸运饰品升级
     * 3-饰品商城
     * 4-红包
     * 5-兑换
     * 6-对战
     * 61-对战过期退回
     * 62-粉丝对战亏损补偿
     * 7-推广充值收益
     * 8-roll房
     * 9-日常活动
     * 10-全名挑战
     * 11-会员等级奖励
     * 12-每日任务奖励
     * 13=成长任务奖励
     * 14= 充值积分箱子
     * 15=推广积分箱子
     * 16=新手任务奖励
     * 17=战令奖励
     * 18=赠送饰品
     * 19=人情工单领取
     * 20=临时补录流水
     */
    public static final String OPERATIONTYPE0 = "0";
    public static final String OPERATIONTYPE1 = "1";
    public static final String OPERATIONTYPE2 = "2";
    public static final String OPERATIONTYPE3 = "3";
    public static final String OPERATIONTYPE4 = "4";
    public static final String OPERATIONTYPE5 = "5";
    public static final String OPERATIONTYPE6 = "6";
    public static final String OPERATIONTYPE61 = "61";
    public static final String OPERATIONTYPE62 = "62";
    public static final String OPERATIONTYPE7 = "7";
    public static final String OPERATIONTYPE8 = "8";
//    public static final String OPERATIONTYPE9 = "9";
    public static final String OPERATIONTYPE10 = "10";
    public static final String OPERATIONTYPE11 = "11";
    public static final String OPERATIONTYPE12 = "12";
    public static final String OPERATIONTYPE13 = "13";
//    public static final String OPERATIONTYPE14 = "14";
//    public static final String OPERATIONTYPE15 = "15";
    public static final String OPERATIONTYPE16 = "16";
    public static final String OPERATIONTYPE17 = "17";
    public static final String OPERATIONTYPE18 = "18";
    public static final String OPERATIONTYPE19 = "19";


    /**
     * 邀请充值比例
     */
    public static final BigDecimal PROMOTIONINVITATIONRTIO = new BigDecimal(0.03);

    /**
     * 账单类型
     */
    public static final String  BILLTYPE0  = "0";

    /**
     * 红包类型Map
     */
    public static final Map<String, String> REDBAGTYPEMAP = new HashMap<String, String>() {
        {
            put("0", "普通红包");
            put("1", "拉新红包");
            put("2", "历史充值门槛红包");
            put("3", "时间段充值门槛");
            put("4", "指定手机号领取");
        }
    };

    /**取回饰品锁*/
    public static final String RETRIEVEKEY = "retrieveLock:";

    /**
     * 充值平台
     * 0 聚合
     * 1 汇潮
     * 2 传化
     * 3 宝和利
     * 4 富信支付
     * 5 九嘉支付
     * 6 优米云支付
     * 7 yukuaiqi支付
     * 8 sanjin支付
     */
    public static String CZPLATFORM0 = "0";
    public static String CZPLATFORM1 = "1";
    public static String CZPLATFORM2 = "2";
    public static String CZPLATFORM3 = "3";
    public static String CZPLATFORM4 = "4";
    public static String CZPLATFORM5 = "5";
    public static String CZPLATFORM6 = "6";
    public static String CZPLATFORM7 = "7";
    public static String CZPLATFORM8 = "8";

    /**充值设备 0  PC  1 手机端*/
    public static  String PC = "0";
    public static  String H5 = "1";

    public static final String STEAMPREFIX= "https://steamcommunity.com/tradeoffer/new/?partner=";

    public static final String USERURLPREFIX= "https://2024skins.com";

    /**
     * 实名认证key
     */
    public static final String authenticationkey="b4c93649623b11c4a3b47a3d477ce70b";


    public static final String[] USERPICS = {"1705303325656.png", "1705303328396.png", "1705303330812.png", "1705303335982.png", "1705303339012.png"};


    public static final String USERNAME_PREFIX = "M10";

    /**
     * 汇潮支付的支付密文
     */
    public static final String HCPAY_CODE_KEY = "hcpay_codes:";

    /**
     * 充值类型 0 微信  1 支付宝
     */
    public static final String WECHATPAY = "0";
    public static final String ALIPAY = "1";

    /*
     * 开箱规则类型  开箱算法（0 天气鱼+奖池 1 保底）
     * */
    public static final String RULE_TYPE0 = "0";
    public static final String RULE_TYPE1 = "1";

    /**
     * 箱子类型
     * 0 普通箱子
     * 1 对战箱子
     * 2 充值积分箱子
     * 3 推广积分箱子
     * 4、刮刮乐箱子
     * 5、免费箱子
     * 6、战令箱子
     */
    public static final String BOXTYPE0 = "0";
    public static final String BOXTYPE1 = "1";
    public static final String BOXTYPE2 = "2";
    public static final String BOXTYPE3 = "3";
    public static final String BOXTYPE4 = "4";
    public static final String BOXTYPE5 = "5";
    public static final String BOXTYPE6 = "6";

    /**
     * 对战类型 0会员对战 1官方对战 2 AI对战 3 粉丝对战
     */
    public static final String BATTLETYPE0 = "0";
    public static final String BATTLETYPE1 = "1";
    public static final String BATTLETYPE2 = "2";
    public static final String BATTLETYPE3 = "3";

    /**
     * 对战类型 0 普通对战  1 非酋对战
     */
    public static final Integer BATTLEMODE0 = 0;
    public static final Integer BATTLEMODE1 = 1;


    /**
     * 发货类型 1人工 2自动
     */
    public static final String DELIVERY1 = "1";
    public static final String DELIVERY2 = "2";

    /**
     * 宝和利支付
     */
    public static final String SPLIT = "&";
    public static final String DOMAIN_NAME = "https://trx.bangbeipay.com/";

    /**
     * 测试地址
     * 扫码接口地址
     */
    public static final String REQUEST_URL = DOMAIN_NAME + "trx/app/interface.action";
    /**
     * 分期接口地址
     */
    public static final String INSTALLMENT_URL = DOMAIN_NAME + "trx/installment/interface.action";
    public static final String TRANSFER_URL = DOMAIN_NAME + "trx/transfer/interface.action";
    /**
     * 测试平台商
     */
    public static final String PA_MERCHANT_NO = "M1800000473";
    public static final String MERCHANT_NO = "收单商户号";
    /**
     * app扫码
     */
    public static final String SIGNKEY_MD5 = "Ly13qsnK9f2S6Ta3h0voBXE3JLCgwcfG";
    public static final String DES_APPPAY = "QvftiEnByGShEXHf3a2FCyCR";
    /**
     * 公共产品
     */
    public static final String COMMON_MD5 = "CrR0c343qSnZ2uhzfRc6bgRWGoC593ro";
    public static final String COMMON_3DES = "HMfdaBJu0qStKdPa9e4mob3S";
    /**
     * 宝和利支付异步回调状态
     */
    public static final String BHL_INIT = "INIT";
    public static final String BHL_DOING = "DOING";
    public static final String BHL_SUCCESS = "SUCCESS";
    public static final String BHL_FAIL = "FAIL";
    public static final String BHL_CLOSE = "CLOSE";
    public static final String BHL_CANCEL = "CANCEL";


    /**
     * 宝和利打卡状态
     */
    public static final String ORDER_RECEIVE  = "RECEIVE";
    public static final String ORDER_INIT  = "INIT";
    public static final String ORDER_DOING  = "DOING";
    public static final String ORDER_SUCCESS  = "SUCCESS";
    public static final String ORDER_FAIL  = "FAIL";
    public static final String ORDER_REFUND  = "REFUND";

    /**
     * 打款银行账号信息
     */
//    public static final String bankAccountNo = "6236681420028729374";
//    public static final String bankAccountName = "王豪哲";
//    public static final String bankCode = "CCB";
    public static final String bankAccountNo = "6235722600000029389";
    public static final String bankAccountName = "陈作磊";
    public static final String bankCode = "BOC";


    /**
     * 单个箱子单日打开总次数key
     */
    public static final String UNPACKINGBOXIDKEY = "openBoxId:";
    /**
     * 单个箱子单日单人打开总次数key
     */
    public static final String UNPACKINGUSERIDKEY = "openUserId:";

    /**
     * 0 主播开箱逻辑为纯概率；
     * 1 主播开箱逻辑为概率+奖池，但是主播行为不叠加奖池；
     * 2 主播开箱逻辑为之前设置的主播开箱逻辑。
     */
    public static final String ANCHORUNPACKINGRULE0 = "0";
    public static final String ANCHORUNPACKINGRULE1 = "1";
    public static final String ANCHORUNPACKINGRULE2 = "2";

    /**
     * 每日福利默认时间
     */
    public static final String  DAILYBENEFITSBEGINTIME = "2022-08-18 02:00:00";

    /**
     * 领取类型 0 手动领取 1 系统自动领取
     */
    public static final Integer  CLAIM_TYPE_0 = 0;
    public static final Integer  CLAIM_TYPE_1 = 1;

    /**
     * 开箱锁key
     */
    public static final String OPENBOXKEY = "openBoxLock:";

    /**全民挑战用户前端*/
    public static final String FULLNAMEUSERKEY = "fullname:";
    public static final String FULLNAMEUSEISPLAY = "fullname_isplay:";

    /**
     * 排雷状态 0 进行中 1 爆炸  2 放弃 3 全通关 4 可复活
     * */
    public static final int mineStsatus0 = 0;
    public static final int mineStsatus1 = 1;
    public static final int mineStsatus2 = 2;
    public static final int mineStsatus3 = 3;
    public static final int mineStsatus4 = 4;

    /**富信支付充值*/
    public static final Integer[][] CZGOODSID = {{5,8360},{10,8363},{50,8364},{100,8365},{200,8366},{300,8367},{500,8368}};

    /**
     * 会员VIP等级开始启动时间
     */
    public static final String curryVIPCzStartTime = "2023-03-04 22:30:00";

    public static final String PAY_CODE_KEY = "pay_codes:";
    public static final String secret_jiujia = "3a2d79b00a38631db9";
    public static final String app_key = "f62ca75f7df1d9";
    public static final String member_id = "98579";


    /**对战箱子饰品key前缀*/
    public static final String BATTLE_GOODS_PRE_KEY = "battle_goods:";
    /**对战锁*/
    public static final String START_BATTLE_LOCK = "start_battle_lock:";
}